<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5/themes/default/easyui.css"></link>
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5/themes/icon.css"></link>
	<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5/demo/demo.css"></link>
	<script language="JavaScript"  type="text/javascript" src="js/jquery-easyui-1.5/jquery.min.js"></script>
	<script language="JavaScript"  type="text/javascript" src="js/jquery-easyui-1.5/jquery.easyui.min.js"></script>
	<script type="text/javascript">
	
	$(document).ready(  
			  function(){
				  
				  $('#role_name').textbox('textbox').focus(); 
				  $('#role_name').textbox('textbox').keydown(function (e) {
				      if (e.keyCode == 13) {
				    	 
				    	  submitForm();
				      }
				  });
			  });
	
	function submitForm(){
		$.post("add_role",
				$('#ff').serialize(),
				  function(data){
						var tabText = $('#role_name').val();
						var url = 'show_add_Authority?id='+data;
						self.parent.addPanel(tabText,url);
			 			
				  },
				  "text");//这里返回的类型有：json,html,xml,text
	}
	function clearForm(){
		$('#ff').form('clear');
	}
	</script>
</head>
<body>
	<center>
       	 <form id="ff">
       	    <table>
       	    	<tr>
       	    		<td>角色：</td>
       	    		<td><input class="easyui-textbox" name="role_name" id="role_name" style="width:120px"/></td>
       	    	</tr>
       	    	
       	    </table>
        	<a href="#" class="easyui-linkbutton" onclick="submitForm()">新&nbsp;&nbsp;增</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="easyui-linkbutton" onclick="clearForm()">重&nbsp;&nbsp;置</a>
         </form>
         </center>
</body>
</html>